<template>
  <div class="login-page">
    <el-input v-model="name" style="width:220px"></el-input>
    <br>
    <br>
    <el-button @click="handleLogin">点击登录</el-button>
  </div>
</template>
<script>

export default {
  data () {
    return {
      name: ''
    }
  },
  methods: {
    async handleLogin () {
      await this.$store.dispatch('set_aside_menu')
      this.$store.dispatch('login', { name: this.name })
    }
  }
}
</script>
<style lang="scss" scoped>
.login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: #724bb5;
}
</style>
